﻿using System;
using System.ComponentModel.DataAnnotations;

namespace WordSmith_V1.Library.Model
{
    public class Credential
    {
        protected Credential(){}
        public Credential(byte[] salt, byte[] hash)
        {        
            Salt = salt;
            Hash = hash;
        }

        //public int Id { get; set; }      
        public byte[] Salt { get; set; }
        public byte[] Hash { get; set; }
        public Guid APIToken { get; protected internal set; }
        public DateTime? TokenTimeStamp { get; protected internal set; }

        public Credential(string _email, string _encryptedHash)
        {
            Email = _email;
            EncryptedHash = _encryptedHash;
        }
        [Key]
        public int Id { get; set; }
        public string Email { get; set; }
        public string EncryptedHash { get; set; }
    }
}
